package cn.appsys.service.impl;

import cn.appsys.dao.UserMapper;
import cn.appsys.pojo.DevUser;
import cn.appsys.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by Super Cui on 2017/10/12.
 */
@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    public UserMapper getUserMapper() {
        return userMapper;
    }

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public Boolean addUser(DevUser user) {
        return userMapper.addUser(user);
    }

    @Override
    public Boolean delUser(DevUser user) {
        return userMapper.delUser(user);
    }

    @Override
    public Boolean updateUser(DevUser user) {
        return userMapper.updateUser(user);
    }

    @Override
    public Boolean updatePassword(DevUser user) {
        return userMapper.updatePassword(user);
    }

    @Override
    public DevUser getUserById(DevUser user) {
        return userMapper.getUserById(user);
    }

    @Override
    public DevUser doLogin(DevUser user) {
        return userMapper.doLogin(user);
    }

    @Override
    public List<DevUser> getUserList(Map<String, Object> map) {
        return userMapper.getUserList(map);
    }

    @Override
    public Integer count(Map<String, Object> map) {
        return userMapper.count(map);
    }

    @Override
    public Integer checkRegistCode(DevUser user) {
        return userMapper.checkRegistCode(user);
    }
}
